﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace System.Models.Models
{
    /// <summary>
    /// 住户表
    /// </summary>
    [Table("T_Household")]
    public class Household:BaseEntity
    {
        /// <summary>
        /// 住户名
        /// </summary>
        [Required,Column(TypeName ="varchar"),StringLength(100)]
        public string UserName { get; set; }
        /// <summary>
        /// 住户密码
        /// </summary>
        [Required, Column(TypeName = "varchar"), StringLength(100)]
        public string PassWord { get; set; }
        /// <summary>
        /// 住户邮箱
        /// </summary>
        [Column(TypeName ="varchar"),StringLength(100)]
        public string Email { get; set; }
        /// <summary>
        /// 住户电话
        /// </summary>
        [Column(TypeName ="varchar"),StringLength(13)]
        public string Iphone { get; set; }

        /// <summary>
        /// 住户性别
        /// </summary>
        public bool Sex { get; set; }

        /// <summary>
        /// 角色表外键
        /// </summary>
        [ForeignKey(nameof(FkId))]
        public int DepartmentRoleId { get; set; }
        public DepartmentRole FkId { get; set; }

    }
}
